﻿CREATE TABLE [dbo].[DataCategory]
(
	[DataCategoryId] SMALLINT NOT NULL PRIMARY KEY, 
	[ParentDataCategoryId] SMALLINT, 
    [DataCategoryName] NVARCHAR(50) NOT NULL, 
	[IsEntity] BIT NOT NULL DEFAULT 0,
	[IsAttribute] BIT NOT NULL DEFAULT 0 ,
	[IsDataTypeRequiredExpression] VARCHAR(1000) NOT NULL DEFAULT 'False',
	[DataTypeRegexPattern] VARCHAR(MAX) NULL,
	[IsDataDefinitionRequiredExpression] VARCHAR(1000) NOT NULL DEFAULT 'False',
	[DataTypeDescription] NVARCHAR(2000) NOT NULL DEFAULT 'Leave data type blank',
	[DataDefinitionDescription] NVARCHAR(2000) NOT NULL DEFAULT 'Leave data definition blank',
    [Level] SMALLINT NOT NULL 
)
